package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("product_inventory")
@ApiModel(value = "成品入库单")
public class ProductInventory {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("物资")
    private String goods;

    @ApiModelProperty("入库单号")
    private String inventoryNo;

    @ApiModelProperty("盘点日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate inventoryDate;

    @ApiModelProperty("连续号")
    private String serialNumber;

    @ApiModelProperty("提货单位及部门")
    private String pickupUnit;

    @ApiModelProperty("发票号码或生产单号码")
    private String invoiceProductionNumber;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("财务部门主管")
    private String financeSupervisor;

    @ApiModelProperty("保管部门主管")
    private String storageSupervisor;

    @ApiModelProperty("发货人")
    private String sender;

    @ApiModelProperty("单位部门主管")
    private String unitSupervisor;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    @ApiModelProperty("入库单明细")
    private List<ProductInventoryItem> itemList;
}